package com.tiger.transaction.sample3;

import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;

public class Client {
	public static void main(String args[]) {
		try {
			InitialContext ctx = new InitialContext();
			Object obj = ctx.lookup("comp/env/ejb/TransferBean");
			TransferHome transferHome = (TransferHome) PortableRemoteObject.narrow(obj, TransferHome.class);

			Transfer transfer = transferHome.create();
			transfer.transfer("George", "Bob", 1500);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
